<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>11-关闭广告5秒之后又弹出</title>
	</head>
	<body>
		<img src="images/1.gif">
		<script type="text/javascript">
			//手动关闭
			var oimg = document.querySelector('img');
			oimg.onclick = function(){
				this.style.display = 'none';
			}
			
			setInterval(show,5000);
			//让广告出来的方法
			function show(){
				oimg.style.display = 'block';
			}
		</script>
	</body>
</html>
